#ifndef BM_ANITEX_H
#define BM_ANITEX_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#include <vector>
#include "SDL/SDL.h"

#define MAX_ANITEX	32

using namespace std;


class BMTex{
	protected:
		GLuint tex;
	public:
		BMTex();
		int load(char filename[128], bool is_skybox = false);
		int loadBMP(char filename[128], bool is_skybox = false);
		int loadTGA(char filename[128], bool is_skybox = false);
		GLuint getTex();
		void freeTex();
		//int BPP, Height, Width; // PCX Images
		//void *pixels; // PCX Images
        //int loadPCX(char filename[128]); // PCX Images
};

class BMAniTex{
	protected:
		int total;
		int loop;
		int loaded;
		BMTex tex[MAX_ANITEX];
        int delay[MAX_ANITEX];
		int cur_delay;
		int cur_tex;
		int cur_loop;
	public:
		BMAniTex();
		void setTotal(int t);
		void setLoop(int l);
		void setDelay(int num, int de);
		void setCurDelay( int de);
		void setCurTex( int im);
		void setCurLoop(int l);
		int getTotal();
		int getLoop();
		GLuint getTex(int num);
		int getDelay(int num);
		int getCurDelay();
		int getCurTex();
		int getCurLoop();
		int load(int t, std::string foldername);
		void updateTex();
		void freeTex();
};


#endif
